Skip to content

ci(android): dockerfile for reproducible APK builds#114

Merged
mickenordin merged 1 commit intomainfrom
ci/android-docker-build
Apr 20, 2026
Merged

ci(android): dockerfile for reproducible APK builds#114
mickenordin merged 1 commit intomainfrom
ci/android-docker-build

Conversation

@mickenordin
Copy link
Copy Markdown
Member

Summary

  • Add Dockerfile.android, mirroring Dockerfile.deb / Dockerfile.rpm / Dockerfile.arch so APK builds are reproducible without installing the Android toolchain on the host.
  • Debian 13 base; JDK 21; Node 22; pnpm; Rust with aarch64-linux-android, armv7-linux-androideabi, i686-linux-android, x86_64-linux-android targets.
  • Pins Android cmdline-tools 11076708, platform android-34, build-tools 34.0.0, NDK 27.0.12077973.
  • Symlinks target-prefixed ar / ranlib / strip / nm in the NDK toolchain bin so the vendored openssl-sys build (which calls aarch64-linux-android-ranlib etc.) completes on recent NDKs that only ship the generic llvm-* names.
  • Build produces a debug-signed universal APK and copies it to /out on docker run.

Usage:

docker build -f Dockerfile.android -t chithi-android .
mkdir -p out && docker run --rm -v "$PWD/out:/out" chithi-android
adb install -r out/app-universal-debug.apk

Note: building on main requires src-tauri/gen/android/ to exist. It lands with the mobile branch (#112). This Dockerfile is useful as-is against that branch; against plain main the build will fail until the mobile scaffold is merged.

Test plan

  • Builds the image end-to-end on my machine (Debian 14 host).
  • Produces out/app-universal-debug.apk.
  • adb install -r onto a physical device; app launches.

Mirrors Dockerfile.deb/rpm/arch. Debian 13 base, JDK 21, Node 22,
pnpm, Rust with the four Android targets, pinned Android SDK
cmdline-tools 11076708 / platform android-34 / build-tools 34.0.0 /
NDK 27.0.12077973. Symlinks the target-prefixed ar/ranlib/strip/nm
names that recent NDKs no longer ship so the vendored openssl-sys
build completes. Produces a debug-signed universal APK and copies it
to /out on docker run.

Usage:
  docker build -f Dockerfile.android -t chithi-android .
  mkdir -p out && docker run --rm -v "$PWD/out:/out" chithi-android

Verified locally: `adb install out/app-universal-debug.apk` onto a
physical device installs and launches.
@mickenordin mickenordin merged commit 84034e4 into main Apr 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant